<#include "/common/defaultEngine.html"/>
<@pageTheme mark="${config.optimize()?string('true', 'false')}">
<@header title="新增过户" bodyClass="white-bg" libs=["prism","bootstrapSelect","ueditor"]/>
<div class="wrapper wrapper-content ibox-content">
    <@form.form id="form-transfer-add"  class="form-horizontal">
    <div class="form-group">        <label class="col-sm-3 control-label"><@ctx.i18n text = "销售员"/>：
    </label>
        <div class="col-sm-8"><input name="saleUserid" class="form-control" type="text" value="${bpmCrmTransfer.saleUserid}"  readonly="true">
        </div>
    </div>
    <div class="form-group">        <label class="col-sm-3 control-label"><@ctx.i18n text = "销售订单编号"/>：
    </label>
        <div class="col-sm-8"><input name="saleOrderNumber" class="form-control" type="text" value="${bpmCrmTransfer.saleOrderNumber}"  readonly="true">
        </div>
    </div>
    <div class="form-group">        <label class="col-sm-3 control-label"><@ctx.i18n text = "车辆识别号"/>：
    </label>
        <div class="col-sm-8"><input name="outCarVin" class="form-control" type="text" value="${bpmCrmTransfer.outCarVin}"  readonly="true">
        </div>
    </div>
    <div class="form-group">        <label class="col-sm-3 control-label"><@ctx.i18n text = "车型"/>：
    </label>
        <div class="col-sm-8"><input name="outCarVehicle" class="form-control" type="text" value="${bpmCrmTransfer.outCarVehicle}"  readonly="true">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><@ctx.i18n text = "特殊备注"/>：</label>
        <div class="col-sm-8">
            <textarea name="orderSpecialRemark" class="form-control" readonly="true">${bpmCrmTransfer.orderSpecialRemark}</textarea>
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-3 control-label"><@ctx.i18n text = "出纳审核"/>：</label>
        <div class="col-sm-8">
            <@form.radio name="orderCashierReview" dictType="sys_bpm_crm_passorclose" value="${bpmCrmTransfer.orderCashierReview}" readOnly="true"/>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><@ctx.i18n text = "财务经理审核"/>：</label>
        <div class="col-sm-8">
            <@form.radio name="orderFinanceManagerReview" dictType="sys_bpm_crm_passorclose" value="${bpmCrmTransfer.orderFinanceManagerReview}" readOnly="true"/>
        </div>
    </div>
    <div class="form-group">        <label class="col-sm-3 control-label"><@ctx.i18n text = "客户ssn"/>：
    </label>
        <div class="col-sm-8"><input name="orderCustomerSsn" class="form-control" type="text" value="${bpmCrmTransfer.orderCustomerSsn}" readonly="true" >
        </div>
    </div>
    <div class="form-group">        <label class="col-sm-3 control-label"><@ctx.i18n text = "客户I-20附件"/>：
    </label>
        <div class="col-sm-8"><input name="orderCustomerIFilepath" class="form-control" type="text" value="${bpmCrmTransfer.orderCustomerIFilepath}" readonly="true" >
        </div>
    </div>
    <div class="form-group">        <label class="col-sm-3 control-label"><@ctx.i18n text = "注册人姓名"/>：
    </label>
        <div class="col-sm-8"><input name="orderRegistrantName" class="form-control" type="text" value="${bpmCrmTransfer.orderRegistrantName}" readonly="true" >
        </div>
    </div>
    <div class="form-group">        <label class="col-sm-3 control-label"><@ctx.i18n text = "注册人地址"/>：
    </label>
        <div class="col-sm-8"><input name="orderRegistrantAddress" class="form-control" type="text" value="${bpmCrmTransfer.orderRegistrantAddress}" readonly="true" >
        </div>
    </div>
    <div class="form-group">        <label class="col-sm-3 control-label"><@ctx.i18n text = "注册人手机"/>：
    </label>
        <div class="col-sm-8"><input name="orderRegistrantPhone" class="form-control" type="text" value="${bpmCrmTransfer.orderRegistrantPhone}" readonly="true" >
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><@ctx.i18n text = "是否需要邮件"/>：</label>
        <div class="col-sm-8">
            <@form.radio name="orderIsNeedMail" dictType="sys_crm_isOrNo" readOnly="true" value="${bpmCrmTransfer.orderIsNeedMail}" />
        </div>
    </div>
    <div class="form-group isNeedMail">
        <label class="col-sm-3 control-label"><@ctx.i18n text = "收件人是否同注册人"/>：</label>
        <div class="col-sm-8">
            <@form.radio name="orderRecipientisregistrant" dictType="sys_crm_isOrNo" readOnly="true" value="${bpmCrmTransfer.orderRecipientisregistrant}" />
        </div>
    </div>
    <div class="form-group different">        <label class="col-sm-3 control-label"><@ctx.i18n text = "收件人姓名"/>：
    </label>
        <div class="col-sm-8"><input name="orderRecipientName" class="form-control" type="text" value="${bpmCrmTransfer.orderRecipientName}" readonly="true">
        </div>
    </div>
    <div class="form-group different">        <label class="col-sm-3 control-label"><@ctx.i18n text = "收件人地址"/>：
    </label>
        <div class="col-sm-8"><input name="orderRecipientAddress" class="form-control" type="text" value="${bpmCrmTransfer.orderRecipientAddress}" readonly="true">
        </div>
    </div>
    <div class="form-group different">        <label class="col-sm-3 control-label"><@ctx.i18n text = "收件人手机"/>：
    </label>
        <div class="col-sm-8"><input name="orderRecipientPhone" class="form-control" type="text" value="${bpmCrmTransfer.orderRecipientPhone}" readonly="true">
        </div>
    </div>
    <div class="form-group different">
        <label class="col-sm-3 control-label"><@ctx.i18n text = "邮件备注"/>：</label>
        <div class="col-sm-8">
            <textarea name="orderRecipientMailMemo" class="form-control" readonly="true">${bpmCrmTransfer.orderRecipientMailMemo}</textarea>
        </div>
    </div>

    <#if bpmCrmTransfer.processStatus==1 >

        <div class="form-group">        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "税"/>：
           </label>
            <div class="col-sm-8"><input name="taxAmount" class="form-control" type="text"  required>
            </div>
         </div>
        <div class="form-group">        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "手续费"/>：
           </label>
            <div class="col-sm-8"><input name="taxServiceCharge" class="form-control" type="text"  required>
            </div>
         </div>
        <div class="form-group">        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "运费"/>：
           </label>
            <div class="col-sm-8"><input name="taxFreight" class="form-control" type="text"  required>
            </div>
         </div>
        <div class="form-group">        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "航运信息"/>：
           </label>
            <div class="col-sm-8"><input name="taxShippingInfo" class="form-control" type="text"  required>
            </div>
         </div>
        <div class="form-group">
            <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "过户日期"/>：</label>
            <div class="col-sm-8">
                <div class="input-group date">
                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    <input class="form-control time-input" name="taxTransferDate"  data-type="date" data-format="yyyy-MM-dd" type="text"  required/>
                </div>
            </div>
        </div>
        <div class="form-group">        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "选择出库单"/>：
           </label>
            <div class="col-sm-8"><input name="outboundPrimarkKey" class="form-control" type="text"  required>
            </div>
         </div>
    </#if>
    <#if bpmCrmTransfer.processStatus==2 >

        <div class="form-group">        <label class="col-sm-3 control-label"><@ctx.i18n text = "税"/>：
        </label>
            <div class="col-sm-8"><input name="taxAmount" class="form-control" type="text" value="${bpmCrmTransfer.taxAmount}" readonly="true">
            </div>
        </div>
        <div class="form-group">        <label class="col-sm-3 control-label"><@ctx.i18n text = "手续费"/>：
        </label>
            <div class="col-sm-8"><input name="taxServiceCharge" class="form-control" type="text" value="${bpmCrmTransfer.taxServiceCharge}" readonly="true">
            </div>
        </div>
        <div class="form-group">        <label class="col-sm-3 control-label"><@ctx.i18n text = "运费"/>：
        </label>
            <div class="col-sm-8"><input name="taxFreight" class="form-control" type="text" value="${bpmCrmTransfer.taxFreight}" readonly="true">
            </div>
        </div>
        <div class="form-group">        <label class="col-sm-3 control-label"><@ctx.i18n text = "航运信息"/>：
        </label>
            <div class="col-sm-8"><input name="taxShippingInfo" class="form-control" type="text" value="${bpmCrmTransfer.taxShippingInfo}" readonly="true">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label"><@ctx.i18n text = "过户日期"/>：</label>
            <div class="col-sm-8">
                <div class="input-group date">
                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    <input class="form-control" name="taxTransferDate"  data-type="date" data-format="yyyy-MM-dd" type="text"  value="${(bpmCrmTransfer.taxTransferDate?string('yyyy-MM-dd'))!}" readonly="true"/>
                </div>
            </div>
        </div>
        <div class="form-group">        <label class="col-sm-3 control-label"><@ctx.i18n text = "选择出库单"/>：
        </label>
            <div class="col-sm-8"><input name="outboundPrimarkKey" class="form-control" type="text" value="${bpmCrmTransfer.outboundPrimarkKey}" readonly="true">
            </div>
        </div>
    </#if>
</@form.form>
</div>
<@footer>
<script type="text/javascript">
    $(function () {
        if($("[name='orderIsNeedMail']")[0].checked){
            $(".isNeedMail").show();
            if($("[name='orderRecipientisregistrant']")[0].checked){
                $(".different").hide();
            }
            else{
                $(".different").show();
            }
        }
        else{
            $(".isNeedMail").hide();
            $(".different").hide();
        }
    })
    var prefix = baseURL + "bpm/transfer"
    $("#form-transfer-add").validate({
        focusCleanup: true
    });

    function submitHandler() {
        // opt.warning("流程实例未启动，无法创建此申请单");
        // return;
        if (opt.validate.form()) {
            //opt.operate.save(prefix + "/add", $('#form-transfer-add').serialize());
        }
    }
    /**
     * redio 单选回调
     * @param id
     * @param data
     * @param event
     */
    function  redioCallback(id,data,event){
        if(id == "orderIsNeedMail"){
            if ($(data).is(':checked')){
                var menuType = $(event.target).val();
                if(menuType=="1"){
                    $(".isNeedMail").show();
                    if($("[name='orderRecipientisregistrant']")[0].checked){
                        $(".different").hide();
                    }
                    else{
                        $(".different").show();
                    }
                }
                else{
                    $(".different").hide();
                    $(".isNeedMail").hide();
                }
            }
        }
        else if(id=="orderRecipientisregistrant"){
            if ($(data).is(':checked')){
                var menuType = $(event.target).val();
                if(menuType=="1"){
                    $(".different").hide();
                }
                else{
                    $(".different").show();
                }
            }
        }
    }

</script>
</@footer>
</@pageTheme>